#include "mainwindow.h"

#include <QApplication>
#include <QTextCodec>
#include <QMap>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

//编码初始化
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
#ifdef Q_OS_WIN32
    QTextCodec *codec = QTextCodec::codecForName("utf-8");
#else
    QTextCodec *codec = QTextCodec::codecForName("utf-8");
#endif
    QTextCodec::setCodecForLocale(codec);
    QTextCodec::setCodecForCStrings(codec);
    QTextCodec::setCodecForTr(codec);
#else
    QTextCodec *codec = QTextCodec::codecForName("utf-8");
    QTextCodec::setCodecForLocale(codec);
#endif

    MainWindow w;
    w.show();
    return a.exec();
}
